package com.example.blogsystem.mapper;

import com.example.blogsystem.entity.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int getArtCount(@Param("uid") Integer uid);

    List<ArticleInfo> getMyBlogList(@Param("uid") Integer uid);

    int deleteBlog(@Param("id") Integer id, Integer uid);

    ArticleInfo getArtDetail(@Param("id") Integer id);

    int updateRCount(@Param("id") Integer id);

    int addBlog(ArticleInfo articleInfo);

    int updateBlog(ArticleInfo articleInfo);

    List<ArticleInfo> getListArtByPage(@Param("psize") Integer psize, @Param("offsize") Integer offsize);

    int getACount();
}
